<template>
	<mForm label-width="100px" :options="options"></mForm>
</template>

<script lang="ts" setup>
import type { FormOptions } from '../../components/form/src/types/type';

	let options:FormOptions[]=[
		{
			type:'input',
			value:'',
			label:'用户名',
			prop:"userName",
			rules:[
				{
					required:true,
					message:'用户名不能为空',
					trigger:'blur',
				},
				{
					min:2,
					max:5,
					message:'用户名长度必须在2和5之间',
					trigger:'blur',
				},
			],
			attrs:{
				clearable:true
			}
		},{
			type:'input',
			value:'',
			label:'密码',
			prop:'password',
			rules:[
				{
					required:true,
					message:'密码不能为空',
					trigger:'blur',
				},
				{
					min:5,
					max:15,
					message:'密码长度必须在5和15之间',
					trigger:'blur',
				},
			],
			attrs:{
				showPassword:true,
				clearable:true
			}
		}
	]
</script>

<style>
</style>